package com.py.credit.service;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.py.credit.entity.EvalInfo;
import com.py.credit.entity.IndexCatModel;
import com.py.credit.entity.Model;
import com.py.framework.core.common.Page;

public interface EvalInfoService {

	List<Model> getListForPage(String sortType, Page page);

	public List<Map<String, Object>> getByConditionForPage(List<String> showColumns, String[] additionalColumns,
			String condition, Page page, String shzt);

	public List<Map> getRelatedCategoryAndIndexValuesByModelId(@Param(value = "userId") String userId,
			@Param(value = "modelId") String modelId);

	void check(List list, String shr, String oldStatus, String newStatus, String type, String shyj, String id,
			String userName, String cardsType, String userId, String Eurl);

	public List<IndexCatModel> getAllIndexAndValuesAndRules(@Param(value = "evalId") String evalId);

	public List<IndexCatModel> getAllIndexAndValuesAndRulesForZz(@Param(value = "evalId") String evalId);

	public List<Map> viewCheck(@Param(value = "modelId") String modelId, @Param(value = "userId") String userId,
			@Param(value = "evalId") String evalId);

	/*
	 * public void preScore(@Param(value = "listIndexes")List<Map>
	 * listIndexes,@Param(value = "userId")String userId,@Param(value =
	 * "modelId")String modelId);
	 */

	public void initScoreByIndex(@Param(value = "deleteScoreByIndex") String deleteScoreByIndex,
			@Param(value = "userId") String userId, @Param(value = "value") String value);

	public String getModelScoreRank(@Param(value = "modelId") String modelId, @Param(value = "score") String score);

	public EvalInfo getNewEvalInfo(@Param(value = "userId") String userId);

	public void updateModelIndexValue(@Param(value = "evalId") String evalId,
			@Param(value = "indexCatModelId") String indexCatModelId, @Param(value = "userId") String userId,
			@Param(value = "value") String value, @Param(value = "cjr") String cjr);

	public void updateModelIndexScore(@Param(value = "indexCatModelId") String indexCatModelId,
			@Param(value = "modelId") String modelId, @Param(value = "userId") String userId,
			@Param(value = "value") double value, @Param(value = "evalId") String evalId);

	public List<IndexCatModel> getAllListScore(List<IndexCatModel> list, @Param(value = "userId") String userId,
			@Param(value = "modelId") String modelId);

	public List<Map> getScoreRank(@Param(value = "score") Double score, @Param(value = "modelId") String modelId);

	public List<Map<String, Object>> getProcessList(@Param(value = "id") String id);

	public void deleteScoreByModelAndUser(@Param(value = "modelId") String modelId,
			@Param(value = "userId") String userId);

	public void updateEvalScoreAndRank(@Param(value = "id") String id, @Param(value = "score") Double score,
			@Param(value = "scoreRank") String scoreRank, @Param(value = "evalInfo") String evalInfo);

	public String getEvalIdByModelAndUser(@Param(value = "modelId") String modelId, @Param(value = "sqr") String sqr);

	public void preScore(@Param(value = "modelId") String modelId, @Param(value = "sqr") String sqr,
			@Param(value = "evalId") String evalId);

	public Map<String, Object> getTotalScore(@Param(value = "evalId") String evalId);

	public List<Map<String, String>> selectModelList(String orgName);

	public double getExtraScore(@Param(value = "evalId") String evalId, @Param(value = "extra") String extra);

	int getAccountNum(String orgId);

	int getPassedCheckNum(String orgId);

	int getProcessCheckNum(String orgId);

	Map<String, Object> getCheckGraphicStats(String orgId, String year);

	Map<String, Object> getAccountGraphicStats(String orgId, String year);

	List<Map<String, String>> getEvalInfoByOrgId(String orgId);

	EvalInfo selectOne(@Param(value = "id") String id);

}
